import { TanStackRouterVite } from "@tanstack/router-vite-plugin";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";

import path from "path";

export default defineConfig({
	plugins: [react(), TanStackRouterVite()],
	resolve: {
		alias: {
			providers: path.resolve(__dirname, "./src/providers"),
			shared: path.resolve(__dirname, "./src/shared"),
			app: path.resolve(__dirname, "./src/app"),
			widgets: path.resolve(__dirname, "./src/widgets"),
			features: path.resolve(__dirname, "./src/features"),
			entities: path.resolve(__dirname, "./src/entities"),
			pages: path.resolve(__dirname, "./src/pages"),
		},
	},
	build: {
		modulePreload: false,
		target: "esnext",
		minify: false,
		cssCodeSplit: false,
	},
});
